package com.sanyang.lawyer.service.finance;

import com.sanyang.lawyer.entity.Finance_pay;
import com.sanyang.lawyer.entity.Finance_payout_type;
import com.sanyang.lawyer.mapper.finance.Finance_payout_typeMapper;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * @program: lawyer
 * @description: 支出类型
 * @author: lql
 * @create: 2019-10-12 10:20
 **/
@Service
public class Finance_payout_typeService {

        @Autowired
        private Finance_payout_typeMapper finance_payout_typeMapper;

        //查询全部
        public List<Finance_payout_type> list(){
            return finance_payout_typeMapper.selectList(null);
        }

        //查询一个
        public Finance_payout_type getbyid(int payoutTypeId){
            return finance_payout_typeMapper.selectById(payoutTypeId);
        }

        //根据name查询
        public Finance_payout_type getbyname(String name){
            return finance_payout_typeMapper.getbyname(name);
        }

        //根据pid查询
        public List<Finance_payout_type> getbypid(){
            return finance_payout_typeMapper.getbypid();
        }
        //查询第二级
        public List<Finance_payout_type> getbychild(int pid){
            return finance_payout_typeMapper.getbychild(pid);
        }
}
